<html>
<head><meta charset="utf-8"><title>The Weekly Edition of the Edition Updates, Edition #​5 · edition 2021 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/index.html">edition 2021</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html">The Weekly Edition of the Edition Updates, Edition #​5</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="235172149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235172149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235172149">(Apr 19 2021 at 12:34)</a>:</h4>
<p>Status updates! <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>
<ul>
<li>std/core panic: Unchanged since last update: Implemented and available already. Automated migration doesn't work yet because of the rustfix multi-span issue.</li>
<li>Range types: No progress. Not going to happen for edition 2021. :(</li>
<li><code>k#</code> keywords: This got extended/generalized to reserving <code>anything#</code> and <code>anything".."</code>, FCP started and is now blocked on a concern on about tokenization vs parsing errors. This went from 'lex all of them' to 'lex none of them' to 'lex all of them' again and then to 'lex some of them?'. This still needs a resolution, but looks like we're getting closer to that.</li>
<li>Prelude changes: Crater report is available, but we still need a migration lint plan.</li>
<li>Or patterns: Discussion on the name for a 'non-or pattern' settled on <code>:pat_param</code>. (See <a href="https://github.com/rust-lang/rust/pull/83386">https://github.com/rust-lang/rust/pull/83386</a>)</li>
<li>Disjoint captures: <span class="user-mention" data-user-id="281950">@Aman Arora</span> What's the status?</li>
<li>IntoIter for <code>[T; N]</code> - This turns out to be feasible as an edition change after all! Implementation PR <a href="https://github.com/rust-lang/rust/pull/84147">here</a>, with FCP already in progress.</li>
<li>rustc_args_required_const: Reached consensus: See <a href="https://github.com/rust-lang/rust/issues/83167#issuecomment-819627409">this comment</a>.</li>
<li>Lints: <span class="user-mention" data-user-id="224872">@rylev</span>?</li>
<li>rustfix multi-span issue: Nobody is working on this yet. See <a href="#narrow/stream/268952-edition-2021/topic/rustfix.20multi-span">this topic</a>.</li>
</ul>



<a name="235172385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235172385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235172385">(Apr 19 2021 at 12:36)</a>:</h4>
<p>Lints are making steady progress. We're ready to merge the lints to errors PR once I figure out <a href="https://github.com/rust-lang/rust/pull/83213#issuecomment-821034253">why some error code tests are failing</a>.</p>



<a name="235201406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235201406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235201406">(Apr 19 2021 at 15:34)</a>:</h4>
<p><span class="user-mention" data-user-id="226095">@Dirkjan Ochtman</span> any updates on the migration lint for the prelude?</p>



<a name="235201843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235201843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235201843">(Apr 19 2021 at 15:37)</a>:</h4>
<p>Actually, <span class="user-mention" data-user-id="226095">@Dirkjan Ochtman</span>, we discussed this in the meeting and I will take a work item to write up the plan</p>



<a name="235201848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235201848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235201848">(Apr 19 2021 at 15:37)</a>:</h4>
<p>i think I know how it should work</p>



<a name="235201867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235201867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235201867">(Apr 19 2021 at 15:37)</a>:</h4>
<p>I'll open an issue with a write-up</p>



<a name="235202022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235202022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dirkjan Ochtman <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235202022">(Apr 19 2021 at 15:38)</a>:</h4>
<p>I also came up with an idea for it</p>



<a name="235202045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235202045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dirkjan Ochtman <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235202045">(Apr 19 2021 at 15:38)</a>:</h4>
<p>Which I can write up in a few hours</p>



<a name="235205451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235205451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235205451">(Apr 19 2021 at 16:00)</a>:</h4>
<p><span class="user-mention" data-user-id="226095">@Dirkjan Ochtman</span> ok -- my rough idea was as follows:</p>
<ul>
<li>tag each new trait with a <code>#[rustc_2021_prelude]</code> attribute</li>
<li>collect all such traits and make them available "somehow" -- collect the methods defined on such traits</li>
<li>when we finish method resolution, if the method name is in that set, and the trait is not, check whether the trait is implemented for the self type</li>
<li>if so, issue a warning suggesting a rewrite into <code>Foo::bar</code> form; we can use the adjustments to track it</li>
</ul>



<a name="235205482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235205482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235205482">(Apr 19 2021 at 16:01)</a>:</h4>
<p>Is that similar to what you had in mind/</p>



<a name="235222261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235222261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235222261">(Apr 19 2021 at 17:58)</a>:</h4>
<p><span class="user-mention" data-user-id="310399">@Mara</span> Regarding syntax reservation, Niko has a concrete proposal that seems like it'll resolve the issue, and that proposal needs to be turned into RFC text. cc <span class="user-mention" data-user-id="256342">@bstrie</span></p>



<a name="235222406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235222406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235222406">(Apr 19 2021 at 17:59)</a>:</h4>
<p>We discussed this some in the meeting today</p>



<a name="235222519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235222519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235222519">(Apr 19 2021 at 18:00)</a>:</h4>
<p>I was pitching <span class="user-mention" data-user-id="310399">@Mara</span> on returning the RFC to "lexer error" and then having her write an RFC just about <code>f"..."</code></p>



<a name="235222550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235222550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235222550">(Apr 19 2021 at 18:00)</a>:</h4>
<p>(and other potentially interesting prefixes)</p>



<a name="235222585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235222585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235222585">(Apr 19 2021 at 18:00)</a>:</h4>
<p><span class="user-mention" data-user-id="310399">@Mara</span> seemed amenable to that</p>



<a name="235222662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235222662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235222662">(Apr 19 2021 at 18:00)</a>:</h4>
<p>(well, was I pitching it? I forget where the idea came from...but anyway that seemed like where we <em>landed</em>)</p>



<a name="235223027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235223027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235223027">(Apr 19 2021 at 18:03)</a>:</h4>
<p>otherwise we end up defining the exact lexing rules for <code>f</code> right now on this RFC. so we figured to go back once more to just make in a lexer error error. there's enough time left before the stabilization of the new edition to get an rfc through about <code>f".."</code> syntax (or at least about how to tokenize it, but maybe the whole feature) after which it'll lex again.</p>



<a name="235223204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235223204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235223204">(Apr 19 2021 at 18:04)</a>:</h4>
<p>I am a fan</p>



<a name="235223224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235223224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235223224">(Apr 19 2021 at 18:04)</a>:</h4>
<p>I'd love to just have an RFC around <code>f"foo"</code>, which I think would be a nice feature</p>



<a name="235223753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235223753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235223753">(Apr 19 2021 at 18:08)</a>:</h4>
<p>the 'move the escaping rules out of the lexer and into the parser' idea (to avoid the lexer needing to understand the meaning of e.g. a <code>b</code> prefix) also seemed a bit trickier than it seemed at first: proc_macros can now assume the string literal tokens they get are already validated, and taking that guarantee might not be a great idea.</p>



<a name="235229301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235229301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Henry-Mantilla <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235229301">(Apr 19 2021 at 18:47)</a>:</h4>
<p><span class="user-mention" data-user-id="310399">@Mara</span> how so? <code>::proc_macro::Literal</code> is an opaque object, and the only thing that can be done with it is obtaining a stringified version / representation of it, which includes the delimiters and everything.</p>
<p>Granted, there are crates out there, such as the elephant in the room, <code>::syn</code>, which feature their own fully-fledged re-parsing logic (<em>c.f.</em>, <a href="https://internals.rust-lang.org/t/getting-value-out-of-proc-macro-literal/14140/5?u=dhm">this thread on IRLO</a>). From that implementation we can see already there that <code>syn</code> is not equipped to handle arbitrarily-prefixed literals. That is not an issue, however, since <code>syn</code> can release updates that adapt to the language, and the proc-macros that would then be using an outdated <code>syn</code> would just be unable to handle new user code that would try to use the new literals: it wouldn't break already existing code.</p>



<a name="235230482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235230482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235230482">(Apr 19 2021 at 18:55)</a>:</h4>
<p>yeah i mean that syn and possibly other crates parse the escape sequences and assume it was already validated. syn just panics if it sees an escape sequence that isn't valid.<br>
and existing proc macros might assume the strings are valid for other reasons. maybe they're used literally embedded in some sql or shell script or whatever.<br>
so i suppose we wouldn't want to start lexing <code>"\xFF\abcd"</code> or <code>b"å"</code> as valid tokens</p>



<a name="235237189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235237189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Henry-Mantilla <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235237189">(Apr 19 2021 at 19:42)</a>:</h4>
<p>Yeah, I was imagining that "weird" literals such as <code>"\xFF\xabcd"</code> could only be envisioned to be lexed like that assuming they carried some non-empty non-already-assigned prefix. In other words, <code>r</code>aw-like lexing would be the default one for all string literals, but for the non-prefixed one and the <code>b</code>-prefixed one.</p>



<a name="235246192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235246192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dirkjan Ochtman <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235246192">(Apr 19 2021 at 20:48)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5/near/235205451">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="226095">Dirkjan Ochtman</span> ok -- my rough idea was as follows:</p>
<ul>
<li>tag each new trait with a <code>#[rustc_2021_prelude]</code> attribute</li>
<li>collect all such traits and make them available "somehow" -- collect the methods defined on such traits</li>
<li>when we finish method resolution, if the method name is in that set, and the trait is not, check whether the trait is implemented for the self type</li>
<li>if so, issue a warning suggesting a rewrite into <code>Foo::bar</code> form; we can use the adjustments to track it</li>
</ul>
</blockquote>
<p>My idea was much more simplistic, basically hard-coding trait method names (so, "try_from()" and "try_into()" and possibly "from_iter()") and then, for any method call that resolves to a trait method of that name, if the trait is not from core or std, suggest a rewrite to expicitly disambiguating form (<code>&lt;foo as MyTryFrom&gt;::try_from()</code>).</p>



<a name="235246431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235246431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dirkjan Ochtman <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235246431">(Apr 19 2021 at 20:50)</a>:</h4>
<p>I think these come down to the same thing-ish, except you want fancy attributes to keep track of the traits/methods involved?</p>



<a name="235310152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235310152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235310152">(Apr 20 2021 at 08:55)</a>:</h4>
<blockquote>
<p>In other words, <code>r</code>aw-like lexing would be the default one for all string literals, but for the non-prefixed one and the <code>b</code>-prefixed one.</p>
</blockquote>
<p><span class="user-mention" data-user-id="232018">@Daniel Henry-Mantilla</span> Then how about <code>hello"\"</code>? <code>r"\"</code> is valid.</p>



<a name="235325694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235325694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Henry-Mantilla <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235325694">(Apr 20 2021 at 11:17)</a>:</h4>
<p>True, the quotes situations is more annoying than I had initially anticipated. Definitely makes sense then to conservatively start with them not even lexing, and then follow-up with targeted additions <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="235357058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235357058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235357058">(Apr 20 2021 at 14:56)</a>:</h4>
<p><span class="user-mention" data-user-id="226095">@Dirkjan Ochtman</span> I agree they come down to the same thing; I think your approach is fine</p>



<a name="235368872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235368872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235368872">(Apr 20 2021 at 15:59)</a>:</h4>
<p><span class="user-mention" data-user-id="256342">@bstrie</span> Thank you for the updated RFC!</p>



<a name="235368956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235368956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235368956">(Apr 20 2021 at 16:00)</a>:</h4>
<p>I was about to resolve the concern. One question on the text as written:</p>



<a name="235369473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235369473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235369473">(Apr 20 2021 at 16:02)</a>:</h4>
<p>Do we want to allow <code>prefix# ident</code> (space after but not before), or do we want to treat <code>prefix#</code> as reserved? I can imagine syntax extensions that might benefit from being able to say "<code>xyz#</code> followed by zero or more characters".</p>



<a name="235369618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235369618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235369618">(Apr 20 2021 at 16:03)</a>:</h4>
<p>I'm fine either way, just wanted to see if there was value in including that in the reservation.</p>



<a name="235378982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235378982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235378982">(Apr 20 2021 at 17:03)</a>:</h4>
<p>I'm not sure what you mean here.  Lexically I'd definitely not expect <code>prefix# ident</code> to be one token...</p>



<a name="235384645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235384645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235384645">(Apr 20 2021 at 17:41)</a>:</h4>
<p>No, I wouldn't either.</p>



<a name="235384664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235384664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235384664">(Apr 20 2021 at 17:41)</a>:</h4>
<p>I'm suggesting that <code>prefix#</code> should be reserved.</p>



<a name="235387543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235387543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235387543">(Apr 20 2021 at 18:01)</a>:</h4>
<p>The rustfix can insert spaces on both sides of the <code>#</code>, which will make it un-reserved.</p>



<a name="235387880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235387880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235387880">(Apr 20 2021 at 18:03)</a>:</h4>
<p>I think that needing the <code>#</code> in a modifier seems odd to me.</p>
<p>If it's before a keyword it can be contextual, for example, and not need the <code>#</code>.  Or it seems like it could often be <code>#[foo] bar</code> instead of <code>foo# bar</code></p>



<a name="235388115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235388115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235388115">(Apr 20 2021 at 18:04)</a>:</h4>
<p>I guess practically I'd say leave it out, to avoid more churn in the RFC, since we'd always be able to just make it <code>Z#foo</code> for now, and if there's a need to do better we could make it <code>foo#</code> in a future edition.</p>



<a name="235388121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235388121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235388121">(Apr 20 2021 at 18:04)</a>:</h4>
<p>The only case I was thinking of would be something like <code>newthing#</code> followed by a zero-or-more character literal, rather than one-or-more.</p>



<a name="235388224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235388224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235388224">(Apr 20 2021 at 18:05)</a>:</h4>
<p>I wasn't imagining that we'd define <code>foo#</code> alone (we could use <code>k#foo</code> or similar for that); I was imagining a case where there was value in defining <code>foo#</code> followed by zero-or-more of something.</p>



<a name="235388232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235388232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235388232">(Apr 20 2021 at 18:05)</a>:</h4>
<p>Oh, as in <code>foo#''</code> or <code>foo#'hello'</code>?</p>



<a name="235388354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235388354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235388354">(Apr 20 2021 at 18:06)</a>:</h4>
<p>No, more like <code>foo#&lt;digit*&gt;</code> or <code>foo#[a-z]*</code>.</p>



<a name="235388513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235388513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235388513">(Apr 20 2021 at 18:07)</a>:</h4>
<p>I don't have a strong opinion about this.</p>



<a name="235388544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235388544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235388544">(Apr 20 2021 at 18:07)</a>:</h4>
<p>it's a bit hard for me to imagine those use cases that <span class="user-mention" data-user-id="239881">@Josh Triplett</span> is describing</p>



<a name="235388559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235388559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235388559">(Apr 20 2021 at 18:07)</a>:</h4>
<p>(I'd like <code>foo#''</code>, if it's not already reserved, but I'd lean to doing it as "<code>''</code> and <code>'hello'</code> tokenize as character literals, but are rejected at parse time", so that the existing lexical rules in the reservation RFC would pick it up.)</p>



<a name="235388782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235388782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235388782">(Apr 20 2021 at 18:09)</a>:</h4>
<p>I don't have a specific use case in mind, and I don't want churn in the RFC either, so I'd be happy to just drop it.</p>



<a name="235388804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/The%20Weekly%20Edition%20of%20the%20Edition%20Updates%2C%20Edition%20%23%E2%80%8B5/near/235388804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/The.20Weekly.20Edition.20of.20the.20Edition.20Updates.2C.20Edition.20.23.E2.80.8B5.html#235388804">(Apr 20 2021 at 18:09)</a>:</h4>
<p>In any case, I'm going to drop my concern shortly.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>